(defun generate-arc-cw (entity)
  (colorize-entity entity)
  (setq cutline 0)
  (princ
    (strcat
      " G04 P300\n G02"
      " X"
      (itoa
	(fix
	  (* (-	(cadr
		  (polar (cass 10 entity)
			 (cass 50 entity)
			 (cass 40 entity)
		  )
		)
		(cadr
		  (polar (cass 10 entity)
			 (cass 51 entity)
			 (cass 40 entity)
		  )
		)
	     )
	     1000
	  )
	)
      )
      " Y"
      (itoa
	(fix
	  (* (-	(car
		  (polar (cass 10 entity)
			 (cass 50 entity)
			 (cass 40 entity)
		  )
		)
		(car
		  (polar (cass 10 entity)
			 (cass 51 entity)
			 (cass 40 entity)
		  )
		)
	     )
	     -1000
	  )
	)
      )
      " I"
      (itoa
	(fix
	  (* (-	(cadr
		  (polar (cass 10 entity)
			 (cass 51 entity)
			 (cass 40 entity)
		  )
		)
		(cadr (cass 10 entity))
	     )
	     -1000
	  )
	)
      )
      " J"
      (itoa
	(fix
	  (* (-	(car
		  (polar (cass 10 entity)
			 (cass 51 entity)
			 (cass 40 entity)
		  )
		)
		(car (cass 10 entity))
	     )
	     1000
	  )
	)
      )
      "\n"
    )
    output
  )
)					; GENERATE-ARC-CW
